package com.example.backend.service;
import com.example.backend.entity.Admin;
import com.example.backend.mapper.AdminMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class AdminService {
    private AdminMapper adminMapper;

    @Autowired
    public AdminService(AdminMapper adminMapper){
        this.adminMapper = adminMapper;
    }
    public boolean adminLogin(@Param("name")String name,@Param("password")String password){
        Admin admin = adminMapper.adminLogin(name,password);
        if(admin==null)
            return false;
        else
            return true;
    }
}
